<script setup>
import {useRouter} from 'vue-router'

const router = useRouter()

const handleLogin = ()=>{
  localStorage.setItem("token","asdadsasd")
  router.push("/")
}
</script>

<template>
  <div>用户名：<input></div>
  <div>密码：<input></div>
  <div><button @click="handleLogin">登录</button></div>
</template>

<style scoped>

</style>